<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:sec="http://www.springframework.org/security/tags"
	xmlns:p="http://primefaces.org/ui">

	<h:form id="top_umenu_form">
	<ul class="nav nav-pills pull-right" style="margin-top: 8px;">
		<li class="dropdown"><a class="dropdown-toggle"
			data-toggle="dropdown" href="#">#{I18N.L_CHOOSE_LANG}<b
				class="caret"></b><i class="icon-globe" style="margin-left: 10px;"></i></a>
			<ul class="dropdown-menu">
				<li><h:commandLink value="" action="#{C_LOGGED_AUTHOR.reload}">
				 	<f:setPropertyActionListener target="#{C_LOGGED_AUTHOR.locale}" value="fr"></f:setPropertyActionListener>
				  <h:graphicImage name="France.png" library="images" /> Francais
				  <c:if test="#{C_LOGGED_AUTHOR.locale eq 'fr'}"><i class="icon-hand-left" style="margin-left: 10px"></i></c:if>
				  </h:commandLink>
				</li>
				<li><h:commandLink value="" action="#{C_LOGGED_AUTHOR.reload}">
				 	<f:setPropertyActionListener target="#{C_LOGGED_AUTHOR.locale}" value="en"></f:setPropertyActionListener>
				  <h:graphicImage name="English.png" library="images" /> Anglais
				  <c:if test="#{C_LOGGED_AUTHOR.locale eq 'en'}"><i class="icon-hand-left" style="margin-left: 10px"></i></c:if>
				  </h:commandLink>
				</li>
			</ul></li>

		<li><a href="http://shop.vapeland.fr">Boutique<i
				class="icon-shopping-cart" style="margin-left: 10px;"></i></a></li>
		<li class="dropdown"><a class="dropdown-toggle"
			data-toggle="dropdown" href="#">#{I18N.L_MYACCOUNT} <b
				class="caret"></b><i class="icon-home" style="margin-left: 10px;"></i></a>
			<ul class="dropdown-menu">
				<sec:authorize ifNotGranted="ROLE_USER">
					<li><a href="#loginBox" data-toggle="modal"><i
							class="icon-lock" style="margin-right: 5px;"></i>#{I18N.L_LOGIN}</a></li>
					<li><a href="register.html"><i class="icon-plus-sign"
							style="margin-right: 5px;"></i>#{I18N.L_REGISTER}</a></li>
				</sec:authorize>
				<sec:authorize ifAnyGranted="ROLE_USER">
					<li><a href="#accountBox" data-toggle="modal"><i
							class="icon-user" style="margin-right: 5px;"></i>#{C_LOGGED_AUTHOR.loggedAuthor.firstName}
							#{C_LOGGED_AUTHOR.loggedAuthor.lastName}</a></li>
					<li><a href="collection.html">
					      <i class="icon-book" style="margin-right: 5px;"></i>Mes collections
					    </a>
					</li>
					<li><h:commandLink value="" action="#{C_RECIPE_SEARCH.searchAuthorRecipe}" >
					      <i class="icon-tag" style="margin-right: 5px;"></i>Mes recettes
					    </h:commandLink>
					</li>
				</sec:authorize>
				<sec:authorize ifAnyGranted="ROLE_ADMIN">
					<li><a href="#"><i class="icon-wrench"
							style="margin-right: 5px;"></i>#{I18N.L_ADMIN}</a></li>
				</sec:authorize>
				<sec:authorize ifAnyGranted="ROLE_USER">
					<li><a href="/juice/j_spring_security_logout"><i
							class="icon-lock" style="margin-right: 5px;"></i>#{I18N.L_LOGOUT}</a></li>
				</sec:authorize>
			</ul></li>
	</ul>
	</h:form>
</ui:composition>
